<?php $tpl->addCSS('css/account_address.css'); ?>
<h2><?php echo $heading_title; ?></h2>
<?php if ($message) { ?> 
<div class="message"><?php echo $message; ?></div>
<?php } ?>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<div id="address">
  <div class="b"><?php echo $text_address_book; ?> </div>
  <?php foreach ($addresses as $result) { ?>
  <div class="c">
    <table width="100%">
      <tr>
        <td width="70%"><?php echo $result['address']; ?></td>
        <td><input class="button_edit" type="button" value="<?php echo $button_edit; ?>" onClick="location='<?php echo $result['update']; ?>'" /></td>
        <td><input class="button_delete" type="button" value="<?php echo $button_delete; ?>" onClick="if (confirm('Are you sure you want to delete?')) { location='<?php echo $result['delete']; ?>'; } else { return; }" ></td>
      </tr>
    </table>
  </div>
  <?php } ?>
  <div class="buttons">
    <table>
      <tr>
        <td align="left"><input class="button_back" type="button" value="<?php echo $button_back; ?>" onClick="location='<?php echo $back; ?>'" /></td>
        <td align="right"><input class="button_new_address" type="submit" value="<?php echo $button_new_address; ?>" onClick="location='<?php echo $insert; ?>'" /></td>
      </tr>
    </table>
  </div>
</div>
